<?php

namespace App\Models\Community;

use App\Models\User\User;
use Illuminate\Database\Eloquent\Model;

class Classes extends Model
{
    protected $table = 'jxt_community_class';
    public $primaryKey = 'id';

    const CREATED_AT = null;
    const UPDATED_AT = null;

    public function baseClass()
    {
        return $this->belongsTo(\App\Models\School\Classes::Class,'class_id','class_id')
            ->where('jxt_school_classes.status',1)
            ->select(['class_id','name']);
    }

}
